package cn.zymall.goods.service.impl;

import cn.zymall.common.model.Sku;
import cn.zymall.goods.mapper.SkuMapper;
import cn.zymall.goods.service.SkuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lxh
 * @Description sku业务层接口实现类
 * @date 2020/8/22 16:43
 * @Classname SkuServiceImpl
 **/
@Service
public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuService {

	@Autowired
	private SkuMapper skuMapper;

	@Override
	public Sku add(Sku sku) {
		skuMapper.add(sku);
		return sku;
	}

	@Override
	public void amend(Sku sku) {
		skuMapper.amend(sku);
	}

	@Override
	public List<Sku> findBySpuId(Integer id) {
		return skuMapper.findBySpuId(id);
	}
}
